Integrand size = 42, antiderivative size = 617 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {(a-b) \sqrt {a+b} \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{192 a b d}+\frac {\sqrt {a+b} \left (15 b^3 B+8 a^3 (9 B+16 C)+4 a^2 b (71 B+52 C)+2 a b^2 (59 B+132 C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{192 a d}-\frac {\sqrt {a+b} \left (48 a^4 B+120 a^2 b^2 B-5 b^4 B+160 a^3 b C+40 a b^3 C\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{64 a^2 d}+\frac {\left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{192 a d}+\frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d} \]
[Out]
Time = 2.03 (sec) , antiderivative size = 617, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4157, 4110, 4179, 4189, 4143, 4006, 3869, 3917, 4089} \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (36 a^2 B+104 a b C+59 b^2 B\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \sec (c+d x)}}{96 d}+\frac {\sqrt {a+b} \left (8 a^3 (9 B+16 C)+4 a^2 b (71 B+52 C)+2 a b^2 (59 B+132 C)+15 b^3 B\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{192 a d}+\frac {(a-b) \sqrt {a+b} \left (128 a^3 C+284 a^2 b B+264 a b^2 C+15 b^3 B\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{192 a b d}+\frac {\left (128 a^3 C+284 a^2 b B+264 a b^2 C+15 b^3 B\right ) \sin (c+d x) \sqrt {a+b \sec (c+d x)}}{192 a d}-\frac {\sqrt {a+b} \left (48 a^4 B+160 a^3 b C+120 a^2 b^2 B+40 a b^3 C-5 b^4 B\right ) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right )}{64 a^2 d}+\frac {a (8 a C+11 b B) \sin (c+d x) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)}}{24 d}+\frac {a B \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2}}{4 d} \]
[In]
[Out]
Rule 3869
Rule 3917
Rule 4006
Rule 4089
Rule 4110
Rule 4143
Rule 4157
Rule 4179
Rule 4189
Rubi steps \begin{align*} \text {integral}& = \int \cos ^4(c+d x) (a+b \sec (c+d x))^{5/2} (B+C \sec (c+d x)) \, dx \\ & = \frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}-\frac {1}{4} \int \cos ^3(c+d x) \sqrt {a+b \sec (c+d x)} \left (-\frac {1}{2} a (11 b B+8 a C)-\left (3 a^2 B+4 b^2 B+8 a b C\right ) \sec (c+d x)-\frac {1}{2} b (3 a B+8 b C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}-\frac {1}{12} \int \frac {\cos ^2(c+d x) \left (-\frac {1}{4} a \left (36 a^2 B+59 b^2 B+104 a b C\right )-\frac {1}{2} \left (49 a^2 b B+24 b^3 B+16 a^3 C+72 a b^2 C\right ) \sec (c+d x)-\frac {3}{4} b \left (17 a b B+8 a^2 C+16 b^2 C\right ) \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx \\ & = \frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\int \frac {\cos (c+d x) \left (\frac {1}{8} a \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right )+\frac {1}{4} a \left (36 a^3 B+161 a b^2 B+152 a^2 b C+96 b^3 C\right ) \sec (c+d x)+\frac {1}{8} a b \left (36 a^2 B+59 b^2 B+104 a b C\right ) \sec ^2(c+d x)\right )}{\sqrt {a+b \sec (c+d x)}} \, dx}{24 a} \\ & = \frac {\left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{192 a d}+\frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}-\frac {\int \frac {-\frac {3}{16} a \left (48 a^4 B+120 a^2 b^2 B-5 b^4 B+160 a^3 b C+40 a b^3 C\right )-\frac {1}{8} a^2 b \left (36 a^2 B+59 b^2 B+104 a b C\right ) \sec (c+d x)+\frac {1}{16} a b \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{24 a^2} \\ & = \frac {\left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{192 a d}+\frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}-\frac {\int \frac {-\frac {3}{16} a \left (48 a^4 B+120 a^2 b^2 B-5 b^4 B+160 a^3 b C+40 a b^3 C\right )+\left (-\frac {1}{8} a^2 b \left (36 a^2 B+59 b^2 B+104 a b C\right )-\frac {1}{16} a b \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right )\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{24 a^2}-\frac {\left (b \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right )\right ) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{384 a} \\ & = \frac {(a-b) \sqrt {a+b} \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{192 a b d}+\frac {\left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{192 a d}+\frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d}+\frac {\left (48 a^4 B+120 a^2 b^2 B-5 b^4 B+160 a^3 b C+40 a b^3 C\right ) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx}{128 a}+\frac {\left (b \left (15 b^3 B+8 a^3 (9 B+16 C)+4 a^2 b (71 B+52 C)+2 a b^2 (59 B+132 C)\right )\right ) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{384 a} \\ & = \frac {(a-b) \sqrt {a+b} \left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \cot (c+d x) E\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{192 a b d}+\frac {\sqrt {a+b} \left (15 b^3 B+8 a^3 (9 B+16 C)+4 a^2 b (71 B+52 C)+2 a b^2 (59 B+132 C)\right ) \cot (c+d x) \operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{192 a d}-\frac {\sqrt {a+b} \left (48 a^4 B+120 a^2 b^2 B-5 b^4 B+160 a^3 b C+40 a b^3 C\right ) \cot (c+d x) \operatorname {EllipticPi}\left (\frac {a+b}{a},\arcsin \left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right ),\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{64 a^2 d}+\frac {\left (284 a^2 b B+15 b^3 B+128 a^3 C+264 a b^2 C\right ) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{192 a d}+\frac {\left (36 a^2 B+59 b^2 B+104 a b C\right ) \cos (c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{96 d}+\frac {a (11 b B+8 a C) \cos ^2(c+d x) \sqrt {a+b \sec (c+d x)} \sin (c+d x)}{24 d}+\frac {a B \cos ^3(c+d x) (a+b \sec (c+d x))^{3/2} \sin (c+d x)}{4 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(5172\) vs. \(2(617)=1234\).
Time = 22.64 (sec) , antiderivative size = 5172, normalized size of antiderivative = 8.38 \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Result too large to show} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(5804\) vs. \(2(568)=1136\).
Time = 506.52 (sec) , antiderivative size = 5805, normalized size of antiderivative = 9.41
[In]
[Out]
\[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{5} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{5} \,d x } \]
[In]
[Out]
\[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int { {\left (C \sec \left (d x + c\right )^{2} + B \sec \left (d x + c\right )\right )} {\left (b \sec \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cos \left (d x + c\right )^{5} \,d x } \]
[In]
[Out]
Timed out. \[ \int \cos ^5(c+d x) (a+b \sec (c+d x))^{5/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\int {\cos \left (c+d\,x\right )}^5\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{5/2} \,d x \]
[In]
[Out]